import axios from '@/libs/api.request'
import config from '@/config'

// 积分
export const getgivescorelist = formdata => {
  return axios.request({
    // url: '/index/useraccount/getgivescorelist',
    url: '/index/useraccount/getgivescorelistbywhere',
    data: formdata,
    method: 'post'
  })
}

export const givescore = ({ uid, score }) => {
  const data = {
    uid,
    score
  }
  return axios.request({
    url: '/index/useraccount/givescorebyuid',
    data,
    method: 'post'
  })
}

// 统计数据
// 获取电话统计数据
export const getTelnoConnectNum = () => {
  return axios.request({
    url: '/index/homepage/getTelnoConnectNum',
    method: 'post'
  })
}
// 获取无代发数据
export const getinventcount1 = () => {
  return axios.request({
    url: '/index/homepage/getinventcount1',
    method: 'post'
  })
}

// 已招满数据
export const getinventfull = () => {
  return axios.request({
    url: '/index/homepage/getinventfull',
    method: 'post'
  })
}

// 未接电话
export const getinventnotanswer = () => {
  return axios.request({
    url: '/index/homepage/getinventnotanswer',
    method: 'post'
  })
}

// 各招工电话联系 联系数量 列表
export const getinventitemtelnoconnectlist = ({ page, size }) => {
  return axios.request({
    url: '/index/homepage/getinventitemtelnoconnectlist',
    method: 'post',
    data: {
      page,
      size
    }
  })
}
// 各招工电话联系 联系数量 列表 今日
export const getinventitemtelnoconnectbydaylist = ({ page, size }) => {
  return axios.request({
    url: '/index/homepage/getinventitemtelnoconnectbydaylist',
    method: 'post',
    data: {
      page,
      size
    }
  })
}

// 统计近昨日日招工联系列表
export const getinventcount2 = () => {
  return axios.request({
    url: '/index/Homepage/getinventcount2',
    method: 'post'
  })
}

// 各招工电话联系 间隔时间 列表
export const getinventitemtelnointervallist = ({ page, size }) => {
  return axios.request({
    url: '/index/homepage/getinventitemtelnointervallist',
    method: 'post',
    data: {
      page,
      size
    }
  })
}
// 各招工电话联系 间隔时间 列表 平均值
export const getinventitemtelnoavgbydaylist = () => {
  return axios.request({
    url: '/index/homepage/getinventitemtelnoavgbydaylist',
    method: 'post'
  })
}

// 统计用户积分
export const getuseraccount = ({ page, size }) => {
  return axios.request({
    url: '/index/homepage/getuseraccount',
    method: 'post',
    data: {
      page,
      size
    }
  })
}

// 统计招工联系列表
export const getconnectlist = searchData => {
  return axios.request({
    // url: '/index/userrecord/getconnectlist',
    url: '/index/userrecord/getconnectbydaylist',
    method: 'post',
    data: searchData
  })
}

// 统计招工时间段
export const getconnecttimebucket = searchData => {
  return axios.request({
    url: '/index/userrecord/getconnecttimebucket',
    method: 'post',
    data: searchData
  })
}
// 统计招工对应联系次数
export const getconnectbyinvent = searchData => {
  return axios.request({
    url: '/index/userrecord/getconnectbyinvent',
    method: 'post',
    data: searchData
  })
}

// 5min 时间内无联系招工列表
export const getnocalldata = searchData => {
  return axios.request({
    url: '/index/invent/getnocalldata',
    method: 'post',
    data: searchData
  })
}

// 获取评论内容
export const getlistevaluateforadmin = searchData => {
  return axios.request({
    url: '/index/evaluate/getlistforadmin',
    method: 'post',
    data: searchData
  })
}
// 获取反馈内容
export const getlistfeedbackbywhere = searchData => {
  return axios.request({
    url: '/index/feedback/getlistbywhere',
    method: 'post',
    data: searchData
  })
}
// 获取订单列表
export const getorderlistbywhere = searchData => {
  return axios.request({
    url: '/index/homepage/getorderlistbywhere',
    method: 'post',
    data: searchData
  })
}
